package com.mtzqc.common.service.impl

import com.blankj.utilcode.util.LogUtils
import com.didi.drouter.annotation.Service
import com.didi.drouter.api.Extend
import com.mtzqc.common.app.App
import com.mtzqc.common.service.LoggerService

@Service(function = [LoggerService::class], cache = Extend.Cache.SINGLETON)
class LoggerImpl : LoggerService {
    init {
        if (App.isDebug()) {
            LogUtils.getConfig().isLog2FileSwitch = true
        }
    }

    override fun d(vararg message: Any) {
        LogUtils.d(message)
    }

    override fun i(vararg message: Any) {
        LogUtils.i(message)
    }

    override fun w(vararg message: Any) {
        LogUtils.w(message)
    }

    override fun e(vararg message: Any) {
        LogUtils.e(message)
    }
}